package com.season.seasonStudy.javase.j_017_enum0.petdemo;

/**
 * 有了这个if-else也不用写了
 * 一个枚举可以改变很多
 */
public enum PetType {
	dog("狗狗",new Dog()), 
	qie("企鹅",new Qie()), 
	cat("猫咪",new Cat());
	private String type;
	private Pet pet;

	private PetType() {
		
	}
	private PetType(String type, Pet pet) {
		this.type = type;
		this.pet = pet;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public Pet getPet() {
		return pet;
	}

	public void setPet(Pet pet) {
		this.pet = pet;
	}


}
